<template>
	<view class="pl20r pr20r hPer100">
		<view class="disFlex pt30r pb30r aliItCenter borB1SF7f7f7"
			v-for="(item, index) in infoDataList" :key="index"
			@click="cliNewsBtn(item)"
		>
			<view class="w80r h80r poRel">
				<image :src="baseUrl + (item.type == 1 ? 'iconNotice.png' :
						item.type == 2 ? 'iconTeaHouse.png' : 'iconVipPenple.png'
					)"
					class="wPer100 hPer100" mode="aspectFit"
				></image>
				<text class="w20r h20r borRad50P backColC72d21 poAbs top0 rig0"
					v-if="item.is_read == 1"
				></text>
				<!-- <view class="w50r lh40r poAbs bom0 rig0 backImgLiGrTRTFbb871aF49f42 f24r colFff teAliCenter borBRRad20r borTRRad4">
					官方
				</view> -->
			</view>
			<view class="flex1 pl20r">
				<view class="disFlex aliItCenter">
					<view class="flex1 foWei500 webLiCl1 webBoxOrVer overHid disWebBox">
						{{item.type == 1 ? item.info.title : item.order_name}}
					</view>
					<view class="w250r teAliRight f24r col999">
						{{item.date}}
					</view>
				</view>
				<view class="f24r mt10r webLiCl1 woBrBrAll webBoxOrVer overHid disWebBox">
					<text class="colCdcdcd">
						{{
							item.is_read == 1 ? '【未读】' :
							item.is_read == 2 ? '【已读】' : item.is_read
						}}
					</text>
					{{item.type == 1 ? item.info.introduce : item.order_introduce}}
				</view>
			</view>
		</view>
		<view class="lh130r teAliCenter col999" v-if="infoMore == true && infoDataList.length">
			已加载全部
		</view>
		<view class="col999 poAbs top50P left50P trTrn50Pn50P" v-if="infoDataList.length == 0">
			暂无消息
		</view>
	</view>
</template>
<script>
import { baseUrl } from '@/utils/request.js'
export default {
	props: {
		infoDataList: { type: Array, default: [] },
		infoMore: { type: Boolean, default: false }
	},
	data() {
		return {
			baseUrl
		}
	},
	methods: {
		cliNewsBtn(item) {
			uni.setStorageSync('noticeDetail', item);
			uni.navigateTo({
				url: '/pages/newsTab/noticeDetail',
				success:res => {
					item.is_read = 2;
					console.log(11, 11)
				}
			})
		},
	}
}
</script>
<style>
</style>